<% option explicit %> <%response.buffer=true%> <% '************************************** '** index.asp '** '** 文件说明:留言本首页 '** 修改日期:2004-12-22 '** 作者:银鹰 '** email:xindc@163.com '************************************** if (not isnumeric(request("page"))) then errinfo="
  • 非法的页面参数!" call error() end if pagename="查看留言" call pageinfo() dim mainpic mainpic="page_index.gif" call skin1() '---------------以下显示页面主体-------- %> <% if session("login")="true" then sql="select * from topic order by top desc,usertime desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 else sql="select * from topic where checked=1 order by top desc,usertime desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 end if if rs.eof and rs.bof then %>
    暂时没有留言,欢迎您留言!
    <% set rs=nothing call skin2() response.end end if dim currentpage,page_count,pcount dim totalrec,endpage if request("page")="" then currentpage=1 else currentpage=cint(request("page")) end if rs.pagesize = perpage rs.absolutepage=currentpage page_count=0 totalrec=rs.recordcount call pages() while (not rs.eof) and (not page_count = rs.pagesize) dim userurl,usermail if len(htmlencode(rs("userurl")))>22 then userurl = left(htmlencode(rs("userurl")),22)&"..." else userurl = htmlencode(rs("userurl")) end if if len(htmlencode(rs("usermail")))>22 then usermail = left(htmlencode(rs("usermail")),22)&"..." else usermail = htmlencode(rs("usermail")) end if %>
    <%if session("login")="true" then%> <%end if%>
    <%if rs("top")=1 then%><%else%>.gif" style="border: 1 solid #000000"><%end if%>

    <%if rs("top")=1 then%>管理员公告<%else%><%=htmlencode(rs("username"))%><%end if%>
    <%if not rs("userurl")="" then%>" title="个人主页"><%=userurl%><%else%>个人主页未填<%end if%>
    <%if not rs("usermail")="" then%>" title="电子邮件"><%=usermail%><%else%>电子邮件未填<%end if%>
    <%if not rs("userqq")="" then%>" title="qq号码"><%=rs("userqq")%><%else%>qq号码未填<%end if%>
    标题:<%if rs("whisper")="1" and not session("login")="true" then%>悄悄话留言<%else%><%=htmlencode(rs("usertitle"))%><%end if%>
    时间:<%=rs("usertime")%>
    <%if rs("whisper")="1" and (not session("login")="true") then%>

    状态:<%if not rs("replycode")="" then%> <%if rs("reply")=1 then%> 已被回复

    <%call viewreply(rs("id")) else%>未被回复 <%end if else%>无法被回复 <%end if%>

    <%else response.write ubbcode(rs("usercontent")) if rs("reply")=1 then%>

    专家回复:
    <%=rs("retime")%>
    <%=ubbcode(rs("recontent"))%>
    <%end if%><%end if%>
    <%if rs("checked")=0 then%>&p=<%=request.querystring("page")%>','您确定要通过审核?')" title="通过审核">通过审核  <%end if%>&p=<%=request.querystring("page")%>','您确定要删除?')" title="删除该文件">删除  <%if rs("whisper")=1 and rs("replycode")="" then%>无法回复的悄悄话<%else%>',600,500)"><%if rs("whisper")=1 then%>悄悄话回复/编辑回复<%else%>回复/编辑回复<%end if%><%end if%>  ',600,500)">编辑  留言ip:<%=rs("ip")%>

    <% page_count = page_count + 1 rs.movenext wend call pages() rs.close set rs=nothing sub viewreply(id) '------查看回复的表单------------ %>

    回复查看码: 
    <%end sub sub pages() '------分页代码------------ dim ii,p,n if totalrec mod perpage=0 then n= totalrec \ perpage else n= totalrec \ perpage+1 end if if currentpage-1 mod 10=0 then p=(currentpage-1) \ 10 else p=(currentpage-1) \ 10 end if response.write ""&_ ""&_ "
    页次:"& currentpage &"/"& n &"页, 每页"& rs.pagesize &"条, 共"& totalrec &"条  " if currentpage=1 then response.write "9 " else response.write "9 " end if if p*10>0 then response.write "7 " response.write "" for ii=p*10+1 to p*10+10 if ii=currentpage then response.write ""+cstr(ii)+" " else response.write ""+cstr(ii)+" " end if if ii=n then exit for 'p=p+1 next response.write "" if ii8 " if currentpage=n then response.write ": " else response.write ": " end if response.write "
    " end sub '--------------页面主题显示结束-------- call skin2() %>